#ifndef __COMN_BIT_MAP_API_H_
#define __COMN_BIT_MAP_API_H_
#include "bitmapdef.h"

boolean set_bit(volatile address map, int byte_size, int bit);

boolean set_char_as(volatile address map, int byte_size, int id, unsigned char v);


boolean clear_bit(volatile address map, int byte_size, int bit);

#define SET_REG_BIT(name, id) \
    set_bit(CAST_AS(volatile address, &name), sizeof(name), id)


#define SET_REG_BYTE(name, id, v) \
    set_char_as(CAST_AS(volatile address, &name), sizeof(name), id, v)

#endif//__COMN_BIT_MAP_API_H_